#include <stdio.h>
#include <conio.h>
#include <string.h>
#define MAX 2000
void main()
{
	char s1[MAX],s2[MAX],c;
	int i,L,n,demsotu=0;
	gets(s1);
	L = strlen(s1);
	strcpy(s2," ");
	n = 0;
	bool inword = false; 
	for (i=0;i<L;i++)
	{
		c = s1[i];
		if (c!=' ')
		{
			inword = true;
			s2[n++] = c;
		}
		else if (inword == true)
		{
			inword = false;
			s2[n++]=' ';
		}
	}
	if (inword == false)
	{
		s2[n-1]=0;
	}
	else 
	{
		s2[n]=0;
	}
	for (i=0;i<n;i++)
	{
		if (s2[i]==' ')
		{
			demsotu++;
		}
	}
	printf("%d",demsotu+1);
}
